<?php
/**
 * Created by Lzh
 * Date: 2021/11/18
 */
defined('BASEPATH') or exit('No direct script access allowed');

class config
{
    private static $config = array(
        'APPID' => 'wxaa4c1375bc186f29', // 公众号id
        'AppSecret' => 'c59221d1ee916e097b9bb69e9001ecec', // 公众号密码
        'tokenExpires' => '', // token保存的时间
        'tokenPath' => '/home/wwwroot/', // 保存token的文件路径
        'tokenName' => 'accesstoken.txt',
        'tokenFlag' => 'accesstokenflag.txt',
        'tokenLogName' => 'accesstokenlog.txt',
        'key' => 'e10adc3949ba59abbe56e057f20f883e', //自定义秘钥，加密解密都需要用到
        'apps' => [ // 用户访问本应用接口的id和秘钥
            'appid1' => 'bd98e16b5eaf3e49fa2ecd3f9ee8f6ae',
            'appid2' => 'b7e23061042f2799180e41d94cdbf861',
        ],
        'users' => [ // 用户密码
            'user1' => 'password1',
            'user2' => 'password2'
        ]
    );

    public static function get($index = '')
    {
        return self::$config[$index];
    }
}
